<template>
	<view class="more">
		<view class="num">{{num}}s后进入首页</view>
		<image src="/static/e1ef8f92436e619000b5d78784ecb00.png"></image>
	</view>
</template>

<script>
	let timer = null
	export default {
		data() {
			return {
				num:3,//倒计时时间
			};
		},
		mounted() {
			//进行倒计时操作
			timer = setInterval(()=>{
				if(this.num<=0){
					clearInterval(timer)
					uni.switchTab({
					    url: '/pages/index/index'
					});
					return 
				}
				this.num--
			},1000)
		},
		destroyed(){
			clearInterval(timer)
		}
	}
</script>

<style lang="scss" scoped>
	.more{
		    height: 100vh;
			width: 100vw;
	}
	.num{
		position: absolute;
		right:20rpx;top:20rpx;
		z-index: 10;
		background-color: #fff;
		border-radius: 20rpx;
		opacity: 0.6;
		color: #000;
		font-size: 20rpx;
		padding: 10rpx;
	}
image{
	width: 100%;
	height :100%;
}
</style>
